require('../db');
const studentService = require('../service/studentService');
async function testFind(){
    console.log(JSON.stringify(await studentService.find({},{current:1,size:10})));
}
async function testFindByClassName(){
    console.log(JSON.stringify(await studentService.findByClassName('f74',{current:2,size:2})));
}
async function testFindById(){
    console.log(await studentService.findById('606c7cb6a734372d8530598'));
}
async function testInsert(){
    console.log(await studentService.insert({
        name:"李四",
        gender:"男",
        age:30
    }));
}
async function testUpdate(){
    let student = await studentService.findById('606fb5435f78e73b742197d2');
    student.gender = '女';
    console.log(await studentService.update('606fb5435f78e73b742197d2',student));
}
async function testDelete(){
    console.log(JSON.stringify(await studentService.delete('606fb5435f78e73b742197d2')));
}

// testFind();
testFindByClassName();
// testFindById();
// testInsert();
// testUpdate();
// testDelete();
